-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes and improvements #44
base: master
Are you sure you want to change the base?
Conversation
Thanks for the PR. We'll have to go through these changes in detail. I see no comments in the code as to what each change is supposed to address, so the confidence level is very low at the moment. I just commented on three of your changes, because I don't know why you would change that. If you could add code comments and explain what each of your changes is about, then we can consider merging them. It seems this has deviated from originally being about concurrency. |
@@ -94,12 +94,10 @@ public class DataService : IJsonSerializable { | |||
httpClient = DefaultHttpMessageHandler == null ? new HttpClient() : new HttpClient(DefaultHttpMessageHandler); | |||
} | |||
_httpClient = httpClient; | |||
_httpClient.BaseAddress = new Uri(ServiceName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to setup in Blazor project BaseAddress externally.
// need to insure that fk props match | ||
var fkProps = np.ForeignKeyProperties; | ||
npEntity.EntityAspect.EntityType = np.EntityType; | ||
// Set this Entity's fk to match np EntityKey | ||
// Order.CustomerID = aCustomer.CustomerID | ||
npEntity.EntityAspect.EntityKey.Values.ForEach((v, i) => SetDpValue(fkProps[i], v)); | ||
//commented because set keys to default values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ApplicationUser has wrong key as empty Guid
Probably you have a better solution. You can use that repo as test.
@@ -120,7 +120,7 @@ public class JsonQueryExpressionVisitor : ExpressionVisitor { | |||
return this.Visit(m.Arguments[0]); | |||
} | |||
} else if (methodName == "OrderByDescending") { | |||
if (this.ParseOrderByExpression(m, "DESC")) { | |||
if (this.ParseOrderByExpression(m, "desc")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DESC is not accepted by Breeze Server
if (string.IsNullOrEmpty(OrderBy)) { | ||
OrderBy = string.Format("{0}{1}", body.Member.Name, order); | ||
} else { | ||
OrderBy = string.Format("{0}, {1}{2}", OrderBy, body.Member.Name, order); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong implementation of OrderBy.
Yesterday I discovered that Parameters implementation is even missing, so I am trying to provide one.
@@ -85,6 +85,13 @@ public class NamingConvention : Internable { | |||
return clone; | |||
} | |||
|
|||
public NamingConvention WithServerClientNamespaceMapping(IDictionary<String, String> serverClientNamespaceMap) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need another type of mapping used in https://github.com/enkodellc/blazorboilerplate/blob/development/src/Shared/BlazorBoilerplate.Shared/Services/ApiClient.cs
See other notes in #33 |
@@ -0,0 +1,69 @@ | |||
using System; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From an old PR of another user (https://github.com/dwarry)
@@ -40,6 +40,8 @@ public class MetadataStore : IJsonSerializable { | |||
|
|||
public static String MetadataVersion = "1.0.3"; | |||
|
|||
private Regex regExGeneric = new Regex(@"`\d+"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Entitities from Asp.Net Identity contain generics and in metadata I have in class name `1 for example.
Do you know how to resolve in another way?
//without a server-side custom model binder for 'Customer?{"parameters":{"companyName":"C"}}' I cannot have parameters with right values, | ||
//so I have to use this hack | ||
if (visitor.Parameters?.Count > 0) | ||
json = json + "&" + string.Join("&", visitor.Parameters.Select(kvp => string.Format("{0}={1}", kvp.Key, kvp.Value))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot make it working without this hack. I need some hints from authors.
No description provided.